package com.bw.user.config;

import com.bw.user.interceptor.Interceptorr;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import javax.annotation.Resource;

public class InterceptorConfig extends WebMvcConfigurationSupport {
    @Resource
    private Interceptorr interceptorr;

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(interceptorr)
                .addPathPatterns("/tb-user/**")
                .excludePathPatterns("/tb-user/send")
                .excludePathPatterns("/tb-user/register")
                .excludePathPatterns("/tb-user/loginpwd")
                .excludePathPatterns("/tb-user/loginmsg")
                .excludePathPatterns("/tb-user/updatepwd")
                .excludePathPatterns("/tb-user/findpwd");
    }
}
